package cate.game.play.skill.effect;


import cate.game.attr.FightAttr;
import cate.game.play.fighter.Fighter;
import cate.game.play.proce.action.ctx.SkillActionCtx;
import cate.game.play.skill.effect.base.HpSE;
import easy.java.dev.note.NoteClass;

@NoteClass("复活")
public class 复活SE extends HpSE {

    @Override
    public void settle(SkillActionCtx action, Fighter target) {
        AttrPair ap = AttrPair.calc(this, action, target);
        FightAttr actorAttr = ap.actor;
        FightAttr targetAttr = ap.target;
        double hpChange = calcHpChange(action, target, actorAttr, targetAttr);
        //技能衰减系数
        hpChange *= 1 + action.getMove().param.getHpChangeRate();
        hpChange *= 1 + parent.getHpChangeRate(target.getPid());
        target.attr.tryResurrect(action, hpChange,parent.isIgnNoRebirth());
//        if(success){
//            FighterPerformance.recSkillResurrect(action, action.getActor(), target);
//        }
    }
}
